#include <algorithm>
#include <iostream>

using namespace std;
// 返回值优化，两个编译器都可以

int main() {

  int *a, *b;
  a = new int{1};
  b = new int{2};

  std::cout << *a << *b << endl;

  swap(a, b);

  std::cout << *a << *b << endl;

  return 0;
}